package principal;

import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;

import patrones.plantilla_conectar;

public class Conectar extends plantilla_conectar {


	@Override
	public boolean abrir_conectar() {
		this.driver = "org.postgresql.Driver";
		this.conneccion = "jdbc:postgresql://localhost:5432/proyecto";
		this.usuario = "postgres";
		this.clave = "1";
		return false;
	}

	@Override
	public boolean cerrar_conectar() {
		try {
			stmt.close();
			con.close();
		} catch (SQLException ex) {
			Logger.getLogger(Conectar.class.getName()).log(Level.SEVERE, null,
					ex);
		}
		return false;
	}


	public Connection getCon() {
		return con;
	}

	public void setCon(Connection con) {
		this.con = con;
	}

	public ResultSet getRs() {
		return rs;
	}

	public void setRs(ResultSet rs) {
		this.rs = rs;
	}

	public Statement getStmt() {
		return stmt;
	}

	public void setStmt(Statement stmt) {
		this.stmt = stmt;
	}

}
